import { SUPPLIER_TYPE_SELECT_LIST } from '@supplier/constants/common';

const DISPOSE_TYPES = [
  { label: '转潜在', value: 1 },
  { label: '淘汰', value: 2 },
  { label: '暂不处理', value: 3 },
]

const BACKLOG_STATES = [
  { label: '待处理', value: '1' },
  { label: '已处理', value: '2' },
]

// 内部管理 合格供应商降级
const FORM_ITEM_LIST = [
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input'
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input'
  },
  {
    prop: 'supplierType',
    label: '供应商类型',
    type: 'select',
    clearable: true,
    options: SUPPLIER_TYPE_SELECT_LIST,
  },
  {
    prop: 'managementAreaId',
    label: '管理区域',
    type: 'managementArea'
  },
  {
    prop: 'personName',
    label: '业务联系人',
    type: 'input'
  },
  {
    prop: 'businessContact',
    label: '业务对接人',
    type: 'userSelect'
  },
  {
    prop: 'disposeName',
    label: '处理人',
    type: 'input'
  },
  {
    prop: 'disposeType',
    label: '处理方式',
    type: 'select',
    clearable: true,
    options: DISPOSE_TYPES,
  },
  {
    prop: 'backlogStates',
    label: '待办状态',
    type: 'select',
    clearable: true,
    options: BACKLOG_STATES,
  },
  {
    prop: 'belongDepartment',
    label: '归属中心',
    required: true,
    type: 'select',
    filterable: true,
    dict: 233,
  },
]
// 表头
const TABLE_COLUMNS = [
  {
    title: '供应商代码',
    key: 'supplierCode'
  },
  {
    title: '供应商名称',
    key: 'supplierName',
  },
  {
    title: '供应商类型',
    key: 'supplierTypeName',
  },
  {
    title: '归属中心',
    key: 'belongDepartmentName',
  },
  {
    title: '供应商分类',
    key: 'supplierClassifyName',
  },
  {
    title: '供应商管理区域',
    key: 'managementAreaName',
  },
  {
    title: '供应商业务联系人',
    key: 'personName',
  },
  {
    title: '供应商业务对接人',
    key: 'businessContactName',
  },
  {
    title: '本年度采购额',
    key: 'yearPurchase',
  },
  {
    title: '供应商创建时间',
    key: 'createTime',
  },
  {
    title: '推送待办时间',
    key: 'backlogTime',
  },
  {
    title: '处理人',
    key: 'createUser',
  },
  {
    title: '实际处理时间',
    key: 'disposeTime',
  },
  {
    title: '待办状态',
    key: 'backlogStatesName',
  },
  {
    title: '处理方式',
    key: 'disposeTypeName',
  },
  {
    title: '暂不处理原因分类',
    key: 'problemReasonTypeName',
  },
  {
    title: '无问题原因',
    key: 'problemReason',
  },
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS,
}
